﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GoldenBicycleCompany.Core;
using FluentNHibernate.Mapping;

namespace GoldenBicycleCompany.Data.NHibernateMaps {
    public class BicycleMap : ClassMap<Bicycle> {
        public BicycleMap() {
            Table("Bicycle");
            Id(x => x.Id, "BicycleId");
            References<BicycleManufacturer>(x => x.BicycleManufacturer, "BicycleManufacturerId");
            References<Color>(x => x.Color, "ColorId");
            References<BicycleType>(x => x.BicycleType, "BicycleTypeId");
            References<BicycleRentalRate>(x => x.RentalRate, "BicycleRentalRateId");
            Map(x => x.BarcodeIdNumber, "BarCodeIdNumber");
            Map(x => x.Model, "Model");
            Map(x => x.YearPurchased, "YearPurchased");
            Map(x => x.PurchasePrice, "PurchasePrice");
            Map(x => x.Description, "Description");
            Map(x => x.PurchasePrice, "PurchasePrice");
            Map(x => x.IsRented, "IsRented");
            Map(x => x.IsUnderMaintenance, "IsUnderMaintenance");
        }
    }
}
